package org.xdq.单例模式.优化后的懒汉式;

public class Test {

    public static void main(String[] args) throws ClassNotFoundException {
//        for(int i=0;i<1000;i++){
//            new Thread(new Runnable() {
//                @Override
//                public void run() {
//                    Instance.getInstance();
//                }
//            }).start();
//        }

        Class.forName("org.xdq.单例模式.优化后的懒汉式.Instance");
        System.out.println("=======================================");
        System.out.println(Instance.getInstance() == Instance.getInstance());
    }
}
